#include "led.h"


void led_disp(unsigned char led_wei,led_flag)
{
	static unsigned char temp = 0x00;
	static unsigned char temp_old = 0xff;
	
	if(led_flag)
	{
	temp = temp | (0x01 << led_wei);
	}
	else
	{
	temp = temp & ~(0x01 << led_wei);
	}
	if(temp != temp_old)
	{
	P0 = ~temp;
	P2 = P2 & 0X1F | 0X80;
	P2 = P2 & 0X1F;
	temp_old = temp;
	}
}